<template>
  <div>
    router测试

    <!-- <h1>通过改变 URL，在不重新请求页面的情况下，更新页面视图。</h1> -->
    <button @click="btnClk">点击</button>
    <!-- <router-link to="/routerParent">点击</router-link> -->
    <!-- <router-link :to="{ name: 'RouterParent', query: { test1: 789 } }"
      >点击1</router-link
    >
    <router-link to="/routerParent">点击2</router-link> -->
    <hr />
    <router-view></router-view>
  </div>
</template>

<script>
export default {
  // props: ["newsletterPopup", "msg", "id"],
  methods: {
    btnClk() {
      this.$router.push("/about").catch((err) => {
        err;
      });
      // this.$router.push("/routerParent/85");
      // this.$router.push("/routerParent/753");
      // this.$router.push({ path: "/routerParent", query: { test: 123 } });
      // this.$router.push({ name: "RouterParent", params: { test1: 789 } });
      // this.$router.push({ name: "RouterParent", query: { test: 789 } });
    },
  },

  mounted() {
    // console.log(this.newsletterPopup);
    // console.log(this.$route);
    // console.log(this.msg);
    // console.log(this.id);
  },
};
</script>

<style scoped></style>
